package com.hmall.search.webXinYing;

import com.hmall.common.dto.PageDTO;
import com.hmall.search.pojo.ItemDoc;
import com.hmall.search.pojo.RequestParam;
import com.hmall.search.serviceXinYing.SearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/search")
public class SearchController {
    @Autowired
    SearchService searchService;

    //基本搜索功能
    @PostMapping("/list")
    public PageDTO<ItemDoc> getSearchPege(@RequestBody RequestParam param) {
        PageDTO<ItemDoc> pageDTO=searchService.getSearchPege(param);
       return pageDTO;
    }

}
